﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace Cloud.Core.Data
{
    public class BaseEntity
    {
    }
    [Serializable]
    public class BaseEntity<TKey> : BaseEntity
    {
        public BaseEntity()
        {
            this.CreateTime = DateTime.Now;
        }

        [Key]       
        public TKey Id { get; set; }
       
        public bool IsDeleted { get; set; }
        public int Sort { get; set; }
        public string Remark { get; set; }
        public int CreateId { get; set; }

        [Display(Name = "添加时间")]
        [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy-MM-dd HH mm}", HtmlEncode = false, NullDisplayText = "数据无效")]
        public DateTime CreateTime { get; set; }
    }
}
